package com.wrs.business;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import com.wrs.business.DBTR;

public class TradeTests {
	private DBTR dbtr;

	@Before
	public void setUp() throws Exception {
	}

	//toString
	@Test
	public void emptyCollectionTest(){
		dbtr = new DBTR();
		Assert.assertEquals( "toString", "com.wrs.business.DBTR@e53108" , dbtr.toString() ) ;
	}

	//quantity
	@Test
	public void quantityTest(){
		trade = new DBTR( 100, 5, null );
		int quantity = 100;
		Assert.assertEquals( "Value", quantity , trade.getQuantity() ) ;
	}
	
	//price
	@Test
	public void priceTest(){
		trade = new DBTR( 100, 5, null );
		int price = 5;
		Assert.assertEquals( "Value", price , trade.getPrice() ) ;
	}
	
	//sum
	@Test
	public void sumTest(){
		trade = new DBTR( 5, 100, null );
		int value = 500;
		Assert.assertEquals( "Value", value , trade.getValue() ) ;
	}
}
